package com.qf.czh.controller;

import com.qf.czh.model.RespPageBean;
import com.qf.czh.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class LogController {
    @Autowired
    LogService logService;

    @GetMapping("/log/page")
    public String logPage(){
        return "/log/log";
    }

    @GetMapping("/log/data")
    @ResponseBody
    public RespPageBean LogData(String page, String rows, String sort , String order, String startTime, String endTime, String username , String type){
       RespPageBean respPageBean =  logService.getLogDataByPage(page,rows ,sort ,order , startTime , endTime , username , type);
       return respPageBean;
    }

}
